package pl.gwt.client.gui;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class RightPanel extends Composite {
	Label title = new Label();
	Widget insidePanel;
	DecoratorPanel decoratorPanel;
	VerticalPanel mainPanel;
	
	public RightPanel(String title){
		this.title.setText(title);
		this.title.setStyleName("rightPanelTitle");
		
		mainPanel = new VerticalPanel();
		mainPanel.add(this.title);
		
		HTML line = new HTML("<HR>");
		mainPanel.add(line);
		
		decoratorPanel = new DecoratorPanel();
		decoratorPanel.setStyleName("gwt-DecoratorPanel");
		decoratorPanel.add(mainPanel);
		
		initWidget(decoratorPanel);
	}
	
	public void addInsidePanel(Widget panel){
		this.insidePanel = panel;
		mainPanel.add(insidePanel);
	}
}
